home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / pascal / scrgen0.zip / SCRGEN.DOC < prev    next >
Text File  |  1986-01-19  |  9KB  |  205 lines

  1.  
  2.  
  3. 19-JAN-86                Turbo Pascal Screen Generator                    Page 1
  4.  
  5.  
  6.  
  7.      This document describes the pre-release version 0.0 of SCRGEN. This version
  8.      of SCRGEN accepts a four-view description of a screen, prepared by any text
  9.      editor, and produces the Turbo Pascal statements that, when called, will
  10.      produce the described screen. Screens may contain text, input fields, boxes
  11.      and lines, and be displayed in various foreground/background color
  12.      combinations.
  13.      
  14.  
  15. 1:   How To Use It
  16.           To use SCRGEN, you must first prepare a text file (non-document, if
  17.           you are using WordStar) that describes your screen. This description
  18.           is comprised of four "views" of the screen: text and input, boxes,
  19.           foreground color and background color. The file itself must consist of
  20.           the four sets of 25 lines each, or exactly 100 lines.
  21.  
  22. 1.1:      View 1
  23.                This is the text and input field screen. Simply arrange the text
  24.                the way you want it, using your word processor. Input fields are
  25.                represented by the underscore character ("_"), which means that
  26.                you can't use that character as part of your text. (If you really
  27.                want an underscore character to be part of your text, use another
  28.                character now and edit the SCRGEN output to change that other
  29.                character to an underscore.)
  30.                
  31.                After you have arranged your twenty-five lines of text and input
  32.                fields the way you want them, use your word processor to make
  33.                three copies of those lines directly beneath the original. That
  34.                will give you the basis for the other three views.
  35.  
  36. 1.2:      View 2
  37.                This is the "box" view. Boxes and lines may be either double or
  38.                single. Draw your boxes and lines using the character "2" to
  39.                represent a double line, and "1" to represent a single line.
  40.                Double and single lines may be mixed. For example,
  41.                
  42.                                  11111111111111111111111111111111111
  43.                                  2                                 2
  44.                                  2                                 2
  45.                                  2                                 2
  46.                                  11111111111111111111111111111111111
  47.                
  48.                would produce a box with double lines on the sides and single
  49.                lines on the top and bottom.
  50.                
  51.                You may also create boxes with intersecting lines. For example:
  52.                
  53.                                  22222222222222222222222222222222222
  54.                                  2                        1        2
  55.                                  2                        1        2
  56.                                  2                        1        2
  57.                                  22222222222222222222222222222222222
  58.                
  59.                will produce a double-lined box with a single line contained
  60.                within it.
  61.                
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  
  69. 19-JAN-86                Turbo Pascal Screen Generator                    Page 2
  70.  
  71.  
  72.  
  73.                In view 2, all characters but "1" and "2" are ignored. So you can
  74.                draw the boxes around your text and, as long as the text does not
  75.                contain "1" or "2", leave it alone. If it does contain any "1" or
  76.                "2" characters, just replace them with a space or other character
  77.                in View 2.
  78.  
  79. 1.3:      View 3
  80.                View 3 represents the foreground color of each character in views
  81.                1 and 2. For view 3 you must replace the characters copied from
  82.                view 1 with a characters that represent the color you want each
  83.                character to be. Here is the "color chart":
  84.                
  85.                        <space> = black (if the background is the default
  86.                background
  87.                                      color, this will be altered to white)
  88.                              K = gray
  89.                              b = blue           B = lightblue
  90.                              g = green          G = lightgreen
  91.                              c = cyan           C = lightcyan
  92.                              r = red            R = lightred
  93.                              m = magenta        M = lightmagenta
  94.                              y = brown          Y = yellow
  95.                              w = white          W = intense white
  96.                
  97.                It's all straightforward, except for <space>. Character positions
  98.                occupied by spaces will be white on the default background color
  99.                (if unspecified when running SCRGEN, black) and black on any
  100.                other color.
  101.  
  102. 1.4:      View 4
  103.                View 4 represents the background colors and is prepared in the
  104.                same way as View 3. The only difference is that the capital
  105.                letter (intense) colors are, of course, unavailable. Character
  106.                positions containing the space character will be the default
  107.                background color.
  108.  
  109. 1.5:      Running SCRGEN
  110.                Once your four views are completed, exit your editor and run
  111.                SCRGEN to produce the Turbo Pascal include file. Here is the run
  112.                sequence:
  113.                
  114.                    C>SCRGEN <infile> <outfile> [ <option> ... ]
  115.                
  116.                    where
  117.                
  118.                        <infile> is the file you just created
  119.                
  120.                        <outfile> is the name you want to give your include file
  121.                
  122.                        <option> is any of the following (more than one option
  123.                            may be specified; if competing options are given,
  124.                            the last is the one that will take effect)
  125.                
  126.                            C=TURBO  : produce Turbo Pascal output. This is the
  127.                default.
  128.  
  129.  
  130.  
  131.  
  132.  
  133.  
  134.  
  135. 19-JAN-86                Turbo Pascal Screen Generator                    Page 3
  136.  
  137.  
  138.  
  139.                            P=<procname>
  140.                
  141.                                where <procname> is the name you want to give the
  142.                                generated procedure. The default name is
  143.                                DISPLAY_SCREEN.
  144.                
  145.                Example: let's say that you have prepared input file TEST.SCR and
  146.                you want to produce TEST.PAS, which is to contain a procedure
  147.                called DISPLAY_HELP. Enter:
  148.                
  149.                    C>SCRGEN TEXT.SCR TEXT.PAS \P=DISPLAY_HELP
  150.                
  151.  
  152. 1.6:      Incorporating The Output
  153.                If your screen contains any data entry fields, you will have to
  154.                supplied name names of the fields being accepted. The code
  155.                produced will have a "READLN" call for each input field at the
  156.                end of the procedure. Just replace the "????" with the actual
  157.                name of the field being accepted.
  158.                
  159.                If you want to test your screen, change the word "PROCEDURE" to
  160.                "PROGRAM" at the beginning and the semi-colon after "END" to a
  161.                period. Then compile and run.
  162.                
  163.                Normal use, of course, is to either copy the file into the
  164.                program that will be using it, or "include" it in with the $I
  165.                compiler directive.
  166.  
  167. 2:   Future Enhancements
  168.           This is a "pre-release" version. That means I would like people to
  169.           beta-test it, even though there are more things I want to do with it.
  170.           When complete, it will be an Underware product and I'll ask for money
  171.           for it.
  172.           
  173.           Here's my "wish list" -- and you can add to it if something occurs to
  174.           you. Just let me know at
  175.           
  176.                   UNDERWARE
  177.